<%@page import="java.util.Date"%>
<%@page import="itsm.isperp.framework.core.context.ContextHolder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = ContextHolder.getWebServerName(request);
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<base href="<%=basePath%>">
<title><%=ContextHolder.getConfigByKey("companyIntro")%>-<%=ContextHolder.getConfigByKey("companyName")%></title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="author" content="ISPERP">
<meta name="Copyright" content="ISPERP" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="favicon.ico" />


<link rel="stylesheet" type="text/css" href="<%=path%>/css/mobile/mobile.css" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/basic.css" />

<link rel="stylesheet" type="text/css" href="<%=path%>/css/basic.css" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/ztree/zTreeStyle.css" />
<script type="text/javascript" src="<%=path%>/wro/basic.js"></script>
<script type="text/javascript" src="<%=path%>/js/widget/tree.js"></script>


<link rel="stylesheet" type="text/css"
	href="<%=path%>/css/global_help.css" />
<script type="text/javascript">
	function toLocation(link) {
		var base = document.getElementsByTagName("base")[0].getAttribute("href");
		window.location.href = base + "/" + link;
	}
</script>


<script type="text/javascript"
	src="<%=path%>/js/libs/my97DatePicker/WdatePicker.js"></script>

<script type="text/javascript">
	function saveSatisfaction() {

		var satisfaction = $("input[name='satisfaction']:checked").val();

		if (satisfaction == "" || satisfaction == undefined) {
			alert("请选择满意度！");
			return false;
		}

		if (satisfaction == "5" || satisfaction == "2" || satisfaction == "1") {
			var customerOpinion = $("#customerOpinion").val();
			if (customerOpinion == "" || customerOpinion == undefined) {
				alert("评价非常满意/不满意/不评价，请务必填写客户意见。");
				return false;
			}
		}

		$("#processBtn").html("提交评分中...");
		$("#saveSatisfactionForm").submit();
	}
</script>
<div class="box_title">请您评价工程师本次处理结果</div>
<div class="ui-body">

	<form:form commandName="model" cssClass="validate"
		id="saveSatisfactionForm"
		action="customer/help/incident/saveSatisfactionUnLogin?curId=${curId}">
		<div style="display: none">
			<input type="hidden" name="openid" value="${openid }"> <input
				name="id" type="hidden" value="${model.id }"><input
				type="hidden" name="processId" value="${model.processId }">
		</div>
		<table class="form-table">
			<tr style="">
				<td colspan="2">
					<div id="processBtn" style="text-align: center;padding:10px;">
						<button type="button" onclick="saveSatisfaction();" value="">提交评分</button>
					</div>
				</td>
			</tr>
			<tr>
				<td class="td1"><label>满意度(5分为满分)：</label></td>
				<td id="satisficationsTd"><form:radiobuttons
						path="satisfaction" cssStyle="width:18px;margin-left:8px"
						items="${satisfications}" itemLabel="name" itemValue="code" />
					&nbsp;&nbsp;</td>
			</tr>
			<tr>
				<td class="td1"><label for="textarea">客户意见：</label>
				</td>
				<td class="td2"><form:textarea path="customerOpinion"
						cssClass="required" /> <span class="required-tip"><font
						color="red"> * </font><font color="blue">必填 </font> </span> <br>（评价完成后直接关闭；评价非常满意/不满意/不评价，请务必填写客户意见。）</td>
			</tr>

		</table>
	</form:form> 

</div>

<div class="ui-body">
	<jsp:include page="basicInfo.jsp"></jsp:include>
</div>

<jsp:include page="../common/bottom.jsp"></jsp:include>